import { Column, Entity, ManyToOne, OneToMany } from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';
import { BackgroundBase } from './theme-back.entity';
import { Theme } from './theme.entity';

@Entity('sys_theme_custom')
export class Custom extends BackgroundBase {
  @Column({
    type: 'varchar',
    default: 'rgba(0,0,0,1)',
    length: 25,
    comment: '导航栏左边字体颜色',
    name: 'left_color',
  })
  leftColor: string;
  @Column({
    type: 'varchar',
    length: 25,
    default: 'rgba(0,0,0,1)',
    comment: '导航栏右边字体颜色',
    name: 'right_color',
  })
  rightColor: string;
  @Column({
    type: 'varchar',
    length: 25,
    default: 'rgba(0,0,0,1)',
    comment: '导航栏中间字体颜色',
  })
  color: string;
  @OneToMany((type) => Theme, (theme) => theme.custom)
  theme: Theme;
}
